package com.roncoo.education.util;

import java.util.Random;

public class UsernameGenerator {
    private static final String[] ADJECTIVES = {"happy", "clever", "brave", "calm", "eager", "gentle", "jolly", "kind", "lively", "nice"};
    private static final String[] NOUNS = {"panda", "tiger", "lion", "bear", "eagle", "dolphin", "wolf", "fox", "rabbit", "owl"};
    private static final Random RANDOM = new Random();

    /**
     * 生成随机用户名
     * @return 生成的用户名
     */
    public static String generate() {
        String adjective = ADJECTIVES[RANDOM.nextInt(ADJECTIVES.length)];
        String noun = NOUNS[RANDOM.nextInt(NOUNS.length)];
        int number = RANDOM.nextInt(1000);
        return adjective + "_" + noun + "_" + number;
    }
}
